Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add jsx-no-danger-with-children rule #1349

Merged
merged 6 commits into from
Nov 29, 2024

Conversation

marvinhagemeister
Copy link
Contributor

This rule ensures that you're not using dangerouslySetInnnerHTML together with passing children to a JSX node. When dangerouslySetInnerHTML is used, any children are always ignored.

src/rules/jsx_no_danger_with_children.rs Outdated Show resolved Hide resolved
}

// most tests are taken from ESlint, commenting those
// requiring code path support
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's code path?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol I just copied the tests from another existing lint rule we had and looks like I copied that code comment everywhere 😂

@marvinhagemeister marvinhagemeister merged commit 1e76fc0 into main Nov 29, 2024
7 checks passed
@marvinhagemeister marvinhagemeister deleted the no-danger-with-children branch November 29, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants